<div class="opts">
  <%= likeable_tag(@topic) %>
  <%= topic_follow_tag(@topic) %>
  <%= topic_favorite_tag(@topic) %>
  <% if admin? %>
    <% if !@topic.suggested_at.blank? %>
    <%= link_to raw("<i class='fa fa-thumb-tack'></i> 取消"), unsuggest_admin_topic_path(@topic), method: :post, remote: true %>
    <% else %>
    <%= link_to raw("<i class='fa fa-thumb-tack'></i> 置顶"), suggest_admin_topic_path(@topic), method: :post, remote: true %>
    <% end %>
    <% if !@topic.excellent? %>
    <%= link_to raw("<i class='fa fa-diamond'></i> 加精"), action_topic_path(@topic.id, type: 'excellent'), title: "设为精华帖" , method: "post", remote: true %>
    <% end %>

    <% if @topic.node_id != Node.no_point_id %>
    <%= link_to raw("<i class='fa fa-ban'></i> 屏蔽"), action_topic_path(@topic.id, type: 'ban'), method: 'post', remote: true, title: "屏蔽此贴，移动到 NoPoint 节点" %>
    <% end %>
  <% end %>
  <span class="pull-right opts">
    <% if owner?(@topic) or admin? %>
    <%= link_to "", edit_topic_path(@topic), class: "fa fa-pencil", title: "修改本帖" %>
      <% if can?(:destroy, @topic) %>
      <%= link_to "", topic_path(@topic.id), method: :delete, remote: true, 'data-confirm': t("common.confirm_delete"), class: "fa fa-trash", title: "删除本帖" %>
      <% end %>
    <% end %>
  </span>
</div>
